<?php

$arr = array(
    'top'  => array(
        0 => array(
            'args' => 'dashboard',
            'text' => $lang['nc_console']
        ),
        1 => array(
            'args' => 'setting',
            'text' => $lang['nc_config']
        ),
        2 => array(
            'args' => 'goods',
            'text' => $lang['nc_goods']
        ),
        3 => array(
            'args' => 'store',
            'text' => $lang['nc_store']
        ),
        4 => array(
            'args' => 'member',
            'text' => $lang['nc_member']
        ),
        5 => array(
            'args' => 'trade',
            'text' => $lang['nc_trade']
        ),
        6 => array(
            'args' => 'website',
            'text' => $lang['nc_website']
        ),
        7 => array(
            'args' => 'operation',
            'text' => $lang['nc_operation']
        ),
        // 8 => array(
        // 	'args'	=> 'stat',
        // 	'text'	=> $lang['nc_stat']),
    ),
    'left' => array(
        0 => array(
            'nav'  => 'dashboard',
            'text' => $lang['nc_normal_handle'],
            'list' => array(
                array('args' => 'base,setting,dashboard', 'text' => $lang['nc_web_set']),
                // array('args'=>'member,member,dashboard',				'text'=>$lang['nc_member_manage']),
                // array('args'=>'store,store,dashboard',					'text'=>$lang['nc_store_manage']),
                // array('args'=>'goods,goods,dashboard',					'text'=>$lang['nc_goods_manage']),
                // array('args'=>'index,order,dashboard',			        'text'=>"订单管理"),
                array('args' => 'db,db,dashboard', 'text' => '数据备份'),
            )
        ),
        1 => array(
            'nav'  => 'setting',
            'text' => $lang['nc_config'],
            'list' => array(
                array('args' => 'base,setting,setting', 'text' => $lang['nc_web_set']),
                array('args' => 'qq,account,setting', 'text' => $lang['nc_web_account_syn']),
                array('args' => 'param,upload,setting', 'text' => $lang['nc_upload_set']),
                array('args' => 'seo,setting,setting', 'text' => $lang['nc_seo_set']),
                array('args' => 'email,message,setting', 'text' => $lang['nc_message_set']),
                array('args' => 'system,payment,setting', 'text' => $lang['nc_pay_method']),
                // array('args'=>'system,else_login,setting',         'text'=>'第三方登录接口'),
                array('args' => 'admin,admin,setting', 'text' => $lang['nc_limit_manage']),
                array('args' => 'index,express,setting', 'text' => $lang['nc_admin_express_set']),
                array('args' => 'waybill_list,waybill,setting', 'text' => '运单模板'),
                array('args' => 'index,offpay_area,setting', 'text' => $lang['nc_admin_offpay_area_set']),
//					array('args' => 'area,area,setting', 'text' => $lang['nc_admin_area_manage']),

                // array('args'=>'mb_payment,mb_payment,setting',				'text'=>'手机支付'),
                array('args' => 'clear,cache,setting', 'text' => $lang['nc_admin_clear_cache']),
                array('args' => 'search,search,setting', 'text' => $lang['nc_admin_search_set']),
                array('args' => 'list,admin_log,setting', 'text' => $lang['nc_admin_log']),
            )
        ),
        2 => array(
            'nav'  => 'goods',
            'text' => $lang['nc_goods'],
            'list' => array(
                array('args' => 'goods_class,goods_class,goods', 'text' => $lang['nc_class_manage']),
                array('args' => 'brand,brand,goods', 'text' => $lang['nc_brand_manage']),
                array('args' => 'goods,goods,goods', 'text' => $lang['nc_goods_manage']),
                array('args' => 'type,type,goods', 'text' => $lang['nc_type_manage']),
                // array('args'=>'spec,spec,goods',						'text'=>$lang['nc_spec_manage']),
                array('args' => 'list,goods_album,goods', 'text' => $lang['nc_album_manage']),
            )
        ),
        3 => array(
            'nav'  => 'store',
            'text' => $lang['nc_store'],
            'list' => array(
                array('args' => 'store,store,store', 'text' => $lang['nc_store_manage']),
                array('args' => 'store_grade,store_grade,store', 'text' => $lang['nc_store_grade']),
                array('args' => 'store_class,store_class,store', 'text' => $lang['nc_store_class']),
                // array('args'=>'store_domain_setting,domain,store',		'text'=>$lang['nc_domain_manage']),
                array('args' => 'stracelist,sns_strace,store', 'text' => $lang['nc_s_snstrace']),
                array('args' => 'help_store,help_store,store', 'text' => '店铺帮助'),
                array('args' => 'edit_info,store_joinin,store', 'text' => '开店首页'),
                array('args' => 'list,ownshop,store', 'text' => '自营店铺'),
            )
        ),
        4 => array(
            'nav'  => 'member',
            'text' => $lang['nc_member'],
            'list' => array(
                array('args' => 'member,member,member', 'text' => $lang['nc_member_manage']),
                array('args' => 'index,member_grade,member', 'text' => '会员级别'),
                array('args' => 'index,exppoints,member', 'text' => $lang['nc_exppoints_manage']),
                array('args' => 'notice,notice,member', 'text' => $lang['nc_member_notice']),
                array('args' => 'addpoints,points,member', 'text' => $lang['nc_member_pointsmanage']),
                array('args' => 'predeposit,predeposit,member', 'text' => $lang['nc_member_predepositmanage']),
                // array('args'=>'sharesetting,sns_sharesetting,member',	'text'=>$lang['nc_binding_manage']),
//					array('args'=>'class_list,sns_malbum,member',			'text'=>$lang['nc_member_album_manage']),
                array('args' => 'tracelist,snstrace,member', 'text' => $lang['nc_snstrace']),
                array('args' => 'member_tag,sns_member,member', 'text' => $lang['nc_member_tag']),
                array('args' => 'chat_log,chat_log,member', 'text' => '聊天记录')
            )
        ),
        5 => array(
            'nav'  => 'trade',
            'text' => $lang['nc_trade'],
            'list' => array(
                array('args' => 'index,order,trade', 'text' => "订单管理"),
                array('args' => 'index,proxy_order,trade', 'text' => "代理统计"),

                // array('args'=>'index,vr_order,trade',				    'text'=>'虚拟订单'),
                array('args' => 'refund_manage,refund,trade', 'text' => '退款管理'),
                array('args' => 'return_manage,return,trade', 'text' => '退货管理'),
                // array('args'=>'refund_manage,vr_refund,trade',		    'text'=>'虚拟订单退款'),
                array('args' => 'consulting,consulting,trade', 'text' => $lang['nc_consult_manage']),
                array('args' => 'inform_list,inform,trade', 'text' => $lang['nc_inform_config']),
                array('args' => 'evalgoods_list,evaluate,trade', 'text' => $lang['nc_goods_evaluate']),
                array('args' => 'complain_new_list,complain,trade', 'text' => $lang['nc_complain_config']),
            )
        ),
        6 => array(
            'nav'  => 'website',
            'text' => $lang['nc_website'],
            'list' => array(
                array('args' => 'article_class,article_class,website', 'text' => $lang['nc_article_class']),
                array('args' => 'article,article,website', 'text' => $lang['nc_article_manage']),
                array('args' => 'navigation,navigation,website', 'text' => $lang['nc_navigation']),
                array('args' => 'document,document,website', 'text' => $lang['nc_document']),
                array('args' => 'ap_manage,adv,website', 'text' => $lang['nc_adv_manage']),
                array('args' => 'web_config,web_config,website', 'text' => $lang['nc_web_index']),
                array('args' => 'place,web_config,website', 'text' => '场馆设计'),
                array('args' => 'new_ad,web_config,website', 'text' => '模板设置')
                // array('args'=>'rec_list,rec_position,website',			'text'=>$lang['nc_admin_res_position']),

            )
        ),
        7 => array(
            'nav'  => 'operation',
            'text' => $lang['nc_operation'],
            'list' => array(
                array('args' => 'setting,operation,operation', 'text' => $lang['nc_operation_set']),
                array('args' => 'groupbuy_template_list,groupbuy,operation', 'text' => $lang['nc_groupbuy_manage']),
                // array('args'=>'index,vr_groupbuy,operation',               'text'=>'虚拟抢购设置'),
                array('args' => 'xianshi_apply,promotion_xianshi,operation', 'text' => $lang['nc_promotion_xianshi']),
                // array('args'=>'mansong_apply,promotion_mansong,operation',	'text'=>$lang['nc_promotion_mansong']),
                // array('args'=>'bundling_list,promotion_bundling,operation',	'text'=>$lang['nc_promotion_bundling']),
                // array('args'=>'goods_list,promotion_booth,operation',		'text'=>$lang['nc_promotion_booth']),
                array('args' => 'voucher_apply,voucher,operation', 'text' => $lang['nc_voucher_price_manage']),
                array('args' => 'index,bill,operation', 'text' => $lang['nc_bill_manage']),
                // array('args'=>'index,vr_bill,operation',					'text'=>'虚拟订单结算'),
                // array('args'=>'activity,activity,operation',				'text'=>$lang['nc_activity_manage']),
                // array('args'=>'pointprod,pointprod,operation',				'text'=>$lang['nc_pointprod']),
                array('args' => 'index,mall_consult,operation', 'text' => '平台客服'),
                array('args' => 'index,rechargecard,operation', 'text' => '平台充值卡'),
                // array('args'=>'index,delivery,operation',                   'text'=>'物流自提服务站')
            )
        ),
        // 8 => array(
        // 	'nav' => 'stat',
        // 	'text' => $lang['nc_stat'],
        // 	'list' => array(
        //         array('args'=>'general,stat_general,stat',			'text'=>$lang['nc_statgeneral']),
        // 		array('args'=>'scale,stat_industry,stat',			'text'=>$lang['nc_statindustry']),
        //         array('args'=>'newmember,stat_member,stat',			'text'=>$lang['nc_statmember']),
        // 		array('args'=>'newstore,stat_store,stat',			'text'=>$lang['nc_statstore']),
        // 		array('args'=>'income,stat_trade,stat',				'text'=>$lang['nc_stattrade']),
        // 		array('args'=>'pricerange,stat_goods,stat',			'text'=>$lang['nc_statgoods']),
        // 		array('args'=>'promotion,stat_marketing,stat',		'text'=>$lang['nc_statmarketing']),
        // 		array('args'=>'refund,stat_aftersale,stat',			'text'=>$lang['nc_stataftersale']),

        // 	)
        // ),
    ),
);
// temporary hidding
if (C('circle_isuse') !== null) {
    $arr['top'][] = array(
        'args' => 'circle',
        'text' => "论坛"
    );
    $arr['left'][] = array(
        'nav'  => 'circle',
        'text' => "论坛",
        'list' => array(
            0 => array('args' => 'index,circle_setting,circle', 'text' => $lang['nc_circle_setting']),
            1 => array('args' => 'index,circle_memberlevel,circle', 'text' => $lang['nc_circle_memberlevel']),
            2 => array('args' => 'class_list,circle_class,circle', 'text' => $lang['nc_circle_classmanage']),
            3 => array('args' => 'circle_list,circle_manage,circle', 'text' => $lang['nc_circle_manage']),
            4 => array('args' => 'theme_list,circle_theme,circle', 'text' => $lang['nc_circle_thememanage']),
            5 => array('args' => 'member_list,circle_member,circle', 'text' => $lang['nc_circle_membermanage']),
            6 => array('args' => 'inform_list,circle_inform,circle', 'text' => $lang['nc_circle_informnamage']),
            7 => array('args' => 'adv_manage,circle_setting,circle', 'text' => $lang['nc_circle_advmanage'])
        )
    );
}


$config = require(dirname(BASE_PATH) . '/data/config/config.ini.php');
if ($config['open_wechat']) {
    $arr['left'][1]['list'][] = array('args' => 'config,wechat,setting', 'text' => '微信设置');
}

if ($config['open_mobile']) {
    $arr['top'][] = array(
        'args' => 'mobile',
        'text' => $lang['nc_mobile']
    );
    $arr['left'][] = array(
        'nav'  => 'mobile',
        'text' => $lang['nc_mobile'],
        'list' => array(
            array('args' => 'index_edit,mb_special,mobile', 'text' => '首页编辑'),
            array('args' => 'special_list,mb_special,mobile', 'text' => '专题设置'),
            array('args' => 'mb_category_list,mb_category,mobile', 'text' => $lang['nc_mobile_catepic']),
            array('args' => 'first_pic,mb_special,mobile', 'text' => '其余设置'),
            // array('args'=>'mb_app,mb_app,mobile',				'text'=>'下载设置'),
            // array('args'=>'flist,mb_feedback,mobile',					'text'=>$lang['nc_mobile_feedback']),
            array('args' => 'mb_payment,mb_payment,mobile', 'text' => '手机支付'),
        )
    );
}

//$arr['top'][] = array(
//    'args' => 'api',
//    "text" => "接口"
//);
//$arr['left'][] = array(
//    'nav'  => 'api',
//    "text" => "接口",
//    "list" => array(
//        array(
//            "args" => "co_index,convert_order,api",
//            "text" => "转单"
//        )
//    )
//);


//print_r($arr);
// if(C('mobile_isuse')){
// 	$arr['top'][] = array(
// 				'args'	=> 'mobile',
// 				'text'	=> $lang['nc_mobile']);
// 	$arr['left'][] = array(
// 				'nav' => 'mobile',
// 				'text' => $lang['nc_mobile'],
// 				'list' => array(
// 					array('args'=>'index_edit,mb_special,mobile',				'text'=>'首页编辑'),
// 					array('args'=>'special_list,mb_special,mobile',				'text'=>'专题设置'),
// 					array('args'=>'mb_category_list,mb_category,mobile',	'text'=>$lang['nc_mobile_catepic']),
// 					// array('args'=>'mb_app,mb_app,mobile',				'text'=>'下载设置'),
//                     array('args'=>'flist,mb_feedback,mobile',					'text'=>$lang['nc_mobile_feedback']),
// 					array('args'=>'mb_payment,mb_payment,mobile',				'text'=>'手机支付'),
// 				)
// 			);
// }

    if (dis_open()) {
        $arr['left'][5]['list'][] = [
            'args' => 'we_distribute,proxy_order,trade', 'text' => '微分销订单管理',
        ];
        $arr['left'][5]['list'][] = [
            'args' => 'we_distribute_member,proxy_order,trade', 'text' => '微分销会员管理'
        ];
        $arr['left'][5]['list'][] = [
            'args' => 'we_distribute_apply,proxy_order,trade', 'text' => '微分销申请管理'
        ];

    }

    @REvent::broadcast("Admin.Menu",$data = ['menu' => &$arr]);
//bed978eedae13bd268e25bfe0a908745 start
//NcHelper::admin_menu($arr);
//bed978eedae13bd268e25bfe0a908745 end
return $arr;
